<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE ExistentialQuantification #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# LANGUAGE GeneralizedNewtypeDeriving #-}</span><span>
</span><span id="line-4"></span><span class="hs-pragma">{-# LANGUAGE RankNTypes #-}</span><span>
</span><span id="line-5"></span><span class="hs-pragma">{-# LANGUAGE FlexibleInstances #-}</span><span>
</span><span id="line-6"></span><span class="hs-pragma">{-# LANGUAGE MultiParamTypeClasses #-}</span><span>
</span><span id="line-7"></span><span class="hs-pragma">{-# LANGUAGE UndecidableInstances #-}</span><span class="hs-cpp">

#if defined(__GLASGOW_HASKELL__) &amp;&amp; __GLASGOW_HASKELL__ &gt;= 702
</span><span class="hs-pragma">{-# LANGUAGE Trustworthy #-}</span><span class="hs-cpp">
#endif
</span><span class="hs-cpp">
#ifndef MIN_VERSION_transformers
</span><span class="hs-cpp">#define MIN_VERSION_transformers(x,y,z) 1
</span><span class="hs-cpp">#endif
</span><span class="hs-cpp">
#ifndef MIN_VERSION_mtl
</span><span class="hs-cpp">#define MIN_VERSION_mtl(x,y,z) 1
</span><span class="hs-cpp">#endif
</span><span>
</span><span id="line-21"></span><span class="hs-comment">--------------------------------------------------------------------</span><span>
</span><span id="line-22"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-23"></span><span class="hs-comment">-- Copyright   :  (C) Edward Kmett 2013-2015, (c) Google Inc. 2012</span><span>
</span><span id="line-24"></span><span class="hs-comment">-- License     :  BSD-style (see the file LICENSE)</span><span>
</span><span id="line-25"></span><span class="hs-comment">-- Maintainer  :  Edward Kmett &lt;ekmett@gmail.com&gt;</span><span>
</span><span id="line-26"></span><span class="hs-comment">-- Stability   :  experimental</span><span>
</span><span id="line-27"></span><span class="hs-comment">-- Portability :  non-portable</span><span>
</span><span id="line-28"></span><span class="hs-comment">--</span><span>
</span><span id="line-29"></span><span class="hs-comment">-- This module supplies a \'pure\' monad transformer that can be used for</span><span>
</span><span id="line-30"></span><span class="hs-comment">-- mock-testing code that throws exceptions, so long as those exceptions</span><span>
</span><span id="line-31"></span><span class="hs-comment">-- are always thrown with 'throwM'.</span><span>
</span><span id="line-32"></span><span class="hs-comment">--</span><span>
</span><span id="line-33"></span><span class="hs-comment">-- Do not mix 'CatchT' with 'IO'. Choose one or the other for the</span><span>
</span><span id="line-34"></span><span class="hs-comment">-- bottom of your transformer stack!</span><span>
</span><span id="line-35"></span><span class="hs-comment">--------------------------------------------------------------------</span><span>
</span><span id="line-36"></span><span>
</span><span id="line-37"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Control.Monad.Catch.Pure</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-38"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Transformer</span></span><span>
</span><span id="line-39"></span><span>    </span><span class="annot"><span class="hs-comment">-- $transformer</span></span><span>
</span><span id="line-40"></span><span>    </span><span class="annot"><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier">CatchT</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Control.Monad.Catch.Pure.html#Catch"><span class="hs-identifier">Catch</span></a></span><span>
</span><span id="line-41"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Control.Monad.Catch.Pure.html#runCatch"><span class="hs-identifier">runCatch</span></a></span><span>
</span><span id="line-42"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Control.Monad.Catch.Pure.html#mapCatchT"><span class="hs-identifier">mapCatchT</span></a></span><span>
</span><span id="line-43"></span><span>
</span><span id="line-44"></span><span>  </span><span class="annot"><span class="hs-comment">-- * Typeclass</span></span><span>
</span><span id="line-45"></span><span>  </span><span class="annot"><span class="hs-comment">-- $mtl</span></span><span>
</span><span id="line-46"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="hs-keyword">module</span><span> </span><span class="annot"><a href="Control.Monad.Catch.html"><span class="hs-identifier">Control.Monad.Catch</span></a></span><span>
</span><span id="line-47"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span class="hs-cpp">

#if defined(__GLASGOW_HASKELL__) &amp;&amp; (__GLASGOW_HASKELL__ &gt;= 706)
</span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier">foldr</span></a></span><span class="hs-special">)</span><span class="hs-cpp">
#else
</span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Prelude</span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">catch</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">foldr</span><span class="hs-special">)</span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-55"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Applicative.html#"><span class="hs-identifier">Control.Applicative</span></a></span><span>
</span><span id="line-56"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Control.Monad.Catch.html"><span class="hs-identifier">Control.Monad.Catch</span></a></span><span>
</span><span id="line-57"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Fail.html#"><span class="hs-identifier">Control.Monad.Fail</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Fail</span></span><span>
</span><span id="line-58"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../mtl/src/Control.Monad.Reader.html#"><span class="hs-identifier">Control.Monad.Reader</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Reader</span></span><span>
</span><span id="line-59"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../mtl/src/Control.Monad.RWS.html#"><span class="hs-identifier">Control.Monad.RWS</span></a></span><span class="hs-cpp">
#if __GLASGOW_HASKELL__ &lt; 710
</span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Data.Foldable</span><span class="hs-cpp">
#endif
</span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Identity.html#"><span class="hs-identifier">Data.Functor.Identity</span></a></span><span>
</span><span id="line-64"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Traversable.html#"><span class="hs-identifier">Data.Traversable</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Traversable</span></span><span>
</span><span id="line-65"></span><span>
</span><span id="line-66"></span><span class="hs-comment">------------------------------------------------------------------------------</span><span>
</span><span id="line-67"></span><span class="hs-comment">-- $mtl</span><span>
</span><span id="line-68"></span><span class="hs-comment">-- The mtl style typeclass</span><span>
</span><span id="line-69"></span><span class="hs-comment">------------------------------------------------------------------------------</span><span>
</span><span id="line-70"></span><span>
</span><span id="line-71"></span><span class="hs-comment">------------------------------------------------------------------------------</span><span>
</span><span id="line-72"></span><span class="hs-comment">-- $transformer</span><span>
</span><span id="line-73"></span><span class="hs-comment">-- The @transformers@-style monad transfomer</span><span>
</span><span id="line-74"></span><span class="hs-comment">------------------------------------------------------------------------------</span><span>
</span><span id="line-75"></span><span>
</span><span id="line-76"></span><span class="hs-comment">-- | Add 'Exception' handling abilities to a 'Monad'.</span><span>
</span><span id="line-77"></span><span class="hs-comment">--</span><span>
</span><span id="line-78"></span><span class="hs-comment">-- This should /never/ be used in combination with 'IO'. Think of 'CatchT'</span><span>
</span><span id="line-79"></span><span class="hs-comment">-- as an alternative base monad for use with mocking code that solely throws</span><span>
</span><span id="line-80"></span><span class="hs-comment">-- exceptions via 'throwM'.</span><span>
</span><span id="line-81"></span><span class="hs-comment">--</span><span>
</span><span id="line-82"></span><span class="hs-comment">-- Note: that 'IO' monad has these abilities already, so stacking 'CatchT' on top</span><span>
</span><span id="line-83"></span><span class="hs-comment">-- of it does not add any value and can possibly be confusing:</span><span>
</span><span id="line-84"></span><span class="hs-comment">--</span><span>
</span><span id="line-85"></span><span class="hs-comment">-- &gt;&gt;&gt; (error &quot;Hello!&quot; :: IO ()) `catch` (\(e :: ErrorCall) -&gt; liftIO $ print e)</span><span>
</span><span id="line-86"></span><span class="hs-comment">-- Hello!</span><span>
</span><span id="line-87"></span><span class="hs-comment">--</span><span>
</span><span id="line-88"></span><span class="hs-comment">-- &gt;&gt;&gt; runCatchT $ (error &quot;Hello!&quot; :: CatchT IO ()) `catch` (\(e :: ErrorCall) -&gt; liftIO $ print e)</span><span>
</span><span id="line-89"></span><span class="hs-comment">-- *** Exception: Hello!</span><span>
</span><span id="line-90"></span><span class="hs-comment">--</span><span>
</span><span id="line-91"></span><span class="hs-comment">-- &gt;&gt;&gt; runCatchT $ (throwM (ErrorCall &quot;Hello!&quot;) :: CatchT IO ()) `catch` (\(e :: ErrorCall) -&gt; liftIO $ print e)</span><span>
</span><span id="line-92"></span><span class="hs-comment">-- Hello!</span><span>
</span><span id="line-93"></span><span>
</span><span id="line-94"></span><span class="hs-keyword">newtype</span><span> </span><span id="CatchT"><span class="annot"><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-var">CatchT</span></a></span></span><span> </span><span id="local-6989586621679055933"><span class="annot"><a href="#local-6989586621679055933"><span class="hs-identifier hs-type">m</span></a></span></span><span> </span><span id="local-6989586621679055932"><span class="annot"><a href="#local-6989586621679055932"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="CatchT"><span class="annot"><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-var">CatchT</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="runCatchT"><span class="annot"><span class="annottext">forall (m :: * -&gt; *) a. CatchT m a -&gt; m (Either SomeException a)
</span><a href="Control.Monad.Catch.Pure.html#runCatchT"><span class="hs-identifier hs-var hs-var">runCatchT</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679055933"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Exception.Type.html#SomeException"><span class="hs-identifier hs-type">SomeException</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055932"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-95"></span><span>
</span><span id="line-96"></span><span class="hs-keyword">type</span><span> </span><span id="Catch"><span class="annot"><a href="Control.Monad.Catch.Pure.html#Catch"><span class="hs-identifier hs-var">Catch</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-type">CatchT</span></a></span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.Identity.html#Identity"><span class="hs-identifier hs-type">Identity</span></a></span><span>
</span><span id="line-97"></span><span>
</span><span id="line-98"></span><span id="local-6989586621679055928"><span class="annot"><a href="Control.Monad.Catch.Pure.html#runCatch"><span class="hs-identifier hs-type">runCatch</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Control.Monad.Catch.Pure.html#Catch"><span class="hs-identifier hs-type">Catch</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055928"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Exception.Type.html#SomeException"><span class="hs-identifier hs-type">SomeException</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055928"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-99"></span><span id="runCatch"><span class="annot"><span class="annottext">runCatch :: forall a. Catch a -&gt; Either SomeException a
</span><a href="Control.Monad.Catch.Pure.html#runCatch"><span class="hs-identifier hs-var hs-var">runCatch</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Identity (Either SomeException a) -&gt; Either SomeException a
forall a. Identity a -&gt; a
</span><a href="../../base/src/Data.Functor.Identity.html#runIdentity"><span class="hs-identifier hs-var hs-var">runIdentity</span></a></span><span> </span><span class="annot"><span class="annottext">(Identity (Either SomeException a) -&gt; Either SomeException a)
-&gt; (CatchT Identity a -&gt; Identity (Either SomeException a))
-&gt; CatchT Identity a
-&gt; Either SomeException a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">CatchT Identity a -&gt; Identity (Either SomeException a)
forall (m :: * -&gt; *) a. CatchT m a -&gt; m (Either SomeException a)
</span><a href="Control.Monad.Catch.Pure.html#runCatchT"><span class="hs-identifier hs-var hs-var">runCatchT</span></a></span><span>
</span><span id="line-100"></span><span>
</span><span id="line-101"></span><span id="local-6989586621679055915"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679055630"><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055915"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-type">Functor</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-type">CatchT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055915"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-102"></span><span>  </span><span id="local-6989586621679055625"><span class="annot"><span class="annottext">fmap :: forall a b. (a -&gt; b) -&gt; CatchT m a -&gt; CatchT m b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var hs-var hs-var hs-var">fmap</span></a></span></span><span> </span><span id="local-6989586621679055624"><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679055624"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-type">CatchT</span></a></span><span> </span><span id="local-6989586621679055623"><span class="annot"><span class="annottext">m (Either SomeException a)
</span><a href="#local-6989586621679055623"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either SomeException b) -&gt; CatchT m b
forall (m :: * -&gt; *) a. m (Either SomeException a) -&gt; CatchT m a
</span><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-var">CatchT</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Either SomeException a -&gt; Either SomeException b)
-&gt; m (Either SomeException a) -&gt; m (Either SomeException b)
forall (m :: * -&gt; *) a1 r. Monad m =&gt; (a1 -&gt; r) -&gt; m a1 -&gt; m r
</span><a href="../../base/src/GHC.Base.html#liftM"><span class="hs-identifier hs-var">liftM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; b) -&gt; Either SomeException a -&gt; Either SomeException b
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679055624"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">m (Either SomeException a)
</span><a href="#local-6989586621679055623"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-103"></span><span>
</span><span id="line-104"></span><span id="local-6989586621679055897"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679055612"><span id="local-6989586621679055614"><span id="local-6989586621679055616"><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055897"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Applicative"><span class="hs-identifier hs-type">Applicative</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-type">CatchT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055897"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-105"></span><span>  </span><span id="local-6989586621679055609"><span class="annot"><span class="annottext">pure :: forall a. a -&gt; CatchT m a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var hs-var hs-var hs-var">pure</span></a></span></span><span> </span><span id="local-6989586621679055608"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055608"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either SomeException a) -&gt; CatchT m a
forall (m :: * -&gt; *) a. m (Either SomeException a) -&gt; CatchT m a
</span><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-var">CatchT</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Either SomeException a -&gt; m (Either SomeException a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Either SomeException a
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055608"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-106"></span><span>  </span><span id="local-6989586621679055606"><span class="annot"><span class="annottext">&lt;*&gt; :: forall a b. CatchT m (a -&gt; b) -&gt; CatchT m a -&gt; CatchT m b
</span><a href="../../base/src/GHC.Base.html#%3C%2A%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">(&lt;*&gt;)</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CatchT m (a -&gt; b) -&gt; CatchT m a -&gt; CatchT m b
forall (m :: * -&gt; *) a b. Monad m =&gt; m (a -&gt; b) -&gt; m a -&gt; m b
</span><a href="../../base/src/GHC.Base.html#ap"><span class="hs-identifier hs-var">ap</span></a></span></span><span>
</span><span id="line-107"></span><span>
</span><span id="line-108"></span><span id="local-6989586621679055891"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679055600"><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055891"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-type">CatchT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055891"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-109"></span><span>  </span><span id="local-6989586621679055596"><span class="annot"><span class="annottext">return :: forall a. a -&gt; CatchT m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var hs-var hs-var hs-var">return</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; CatchT m a
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span>
</span><span id="line-110"></span><span>  </span><span class="annot"><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-type">CatchT</span></a></span><span> </span><span id="local-6989586621679055593"><span class="annot"><span class="annottext">m (Either SomeException a)
</span><a href="#local-6989586621679055593"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679055592"><span class="annot"><span class="annottext">&gt;&gt;= :: forall a b. CatchT m a -&gt; (a -&gt; CatchT m b) -&gt; CatchT m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var hs-var hs-var hs-var">&gt;&gt;=</span></a></span></span><span> </span><span id="local-6989586621679055591"><span class="annot"><span class="annottext">a -&gt; CatchT m b
</span><a href="#local-6989586621679055591"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either SomeException b) -&gt; CatchT m b
forall (m :: * -&gt; *) a. m (Either SomeException a) -&gt; CatchT m a
</span><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-var">CatchT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (Either SomeException b) -&gt; CatchT m b)
-&gt; m (Either SomeException b) -&gt; CatchT m b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">m (Either SomeException a)
</span><a href="#local-6989586621679055593"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">m (Either SomeException a)
-&gt; (Either SomeException a -&gt; m (Either SomeException b))
-&gt; m (Either SomeException b)
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679055590"><span class="annot"><span class="annottext">Either SomeException a
</span><a href="#local-6989586621679055590"><span class="hs-identifier hs-var">ea</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Either SomeException a
</span><a href="#local-6989586621679055590"><span class="hs-identifier hs-var">ea</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-111"></span><span>    </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span id="local-6989586621679055589"><span class="annot"><span class="annottext">SomeException
</span><a href="#local-6989586621679055589"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Either SomeException b -&gt; m (Either SomeException b)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SomeException -&gt; Either SomeException b
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="annot"><span class="annottext">SomeException
</span><a href="#local-6989586621679055589"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-112"></span><span>    </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span id="local-6989586621679055588"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055588"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CatchT m b -&gt; m (Either SomeException b)
forall (m :: * -&gt; *) a. CatchT m a -&gt; m (Either SomeException a)
</span><a href="Control.Monad.Catch.Pure.html#runCatchT"><span class="hs-identifier hs-var hs-var">runCatchT</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; CatchT m b
</span><a href="#local-6989586621679055591"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055588"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span></span><span class="hs-cpp">
#if !(MIN_VERSION_base(4,13,0))
</span><span>  </span><span class="hs-identifier">fail</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">Fail.fail</span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-117"></span><span id="local-6989586621679055872"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055872"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Fail.html#MonadFail"><span class="hs-identifier hs-type">Fail.MonadFail</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-type">CatchT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055872"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-118"></span><span>  </span><span id="local-6989586621679055578"><span class="annot"><span class="annottext">fail :: forall a. String -&gt; CatchT m a
</span><a href="../../base/src/Control.Monad.Fail.html#fail"><span class="hs-identifier hs-var hs-var hs-var hs-var">fail</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either SomeException a) -&gt; CatchT m a
forall (m :: * -&gt; *) a. m (Either SomeException a) -&gt; CatchT m a
</span><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-var">CatchT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (Either SomeException a) -&gt; CatchT m a)
-&gt; (String -&gt; m (Either SomeException a)) -&gt; String -&gt; CatchT m a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Either SomeException a -&gt; m (Either SomeException a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Either SomeException a -&gt; m (Either SomeException a))
-&gt; (String -&gt; Either SomeException a)
-&gt; String
-&gt; m (Either SomeException a)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">SomeException -&gt; Either SomeException a
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="annot"><span class="annottext">(SomeException -&gt; Either SomeException a)
-&gt; (String -&gt; SomeException) -&gt; String -&gt; Either SomeException a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">IOError -&gt; SomeException
forall e. Exception e =&gt; e -&gt; SomeException
</span><a href="../../base/src/GHC.Exception.Type.html#toException"><span class="hs-identifier hs-var">toException</span></a></span><span> </span><span class="annot"><span class="annottext">(IOError -&gt; SomeException)
-&gt; (String -&gt; IOError) -&gt; String -&gt; SomeException
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; IOError
</span><a href="../../base/src/GHC.IO.Exception.html#userError"><span class="hs-identifier hs-var">userError</span></a></span></span><span>
</span><span id="line-119"></span><span>
</span><span id="line-120"></span><span id="local-6989586621679055864"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055864"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-type">CatchT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055864"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-121"></span><span>  </span><span id="local-6989586621679055564"><span class="annot"><span class="annottext">mfix :: forall a. (a -&gt; CatchT m a) -&gt; CatchT m a
</span><a href="../../base/src/Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var hs-var hs-var hs-var">mfix</span></a></span></span><span> </span><span id="local-6989586621679055563"><span class="annot"><span class="annottext">a -&gt; CatchT m a
</span><a href="#local-6989586621679055563"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either SomeException a) -&gt; CatchT m a
forall (m :: * -&gt; *) a. m (Either SomeException a) -&gt; CatchT m a
</span><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-var">CatchT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (Either SomeException a) -&gt; CatchT m a)
-&gt; m (Either SomeException a) -&gt; CatchT m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Either SomeException a -&gt; m (Either SomeException a))
-&gt; m (Either SomeException a)
forall (m :: * -&gt; *) a. MonadFix m =&gt; (a -&gt; m a) -&gt; m a
</span><a href="../../base/src/Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var">mfix</span></a></span><span> </span><span class="annot"><span class="annottext">((Either SomeException a -&gt; m (Either SomeException a))
 -&gt; m (Either SomeException a))
-&gt; (Either SomeException a -&gt; m (Either SomeException a))
-&gt; m (Either SomeException a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679055562"><span class="annot"><span class="annottext">Either SomeException a
</span><a href="#local-6989586621679055562"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CatchT m a -&gt; m (Either SomeException a)
forall (m :: * -&gt; *) a. CatchT m a -&gt; m (Either SomeException a)
</span><a href="Control.Monad.Catch.Pure.html#runCatchT"><span class="hs-identifier hs-var hs-var">runCatchT</span></a></span><span> </span><span class="annot"><span class="annottext">(CatchT m a -&gt; m (Either SomeException a))
-&gt; CatchT m a -&gt; m (Either SomeException a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; CatchT m a
</span><a href="#local-6989586621679055563"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; CatchT m a) -&gt; a -&gt; CatchT m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Either SomeException a
</span><a href="#local-6989586621679055562"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-122"></span><span>    </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span id="local-6989586621679055561"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055561"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055561"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-123"></span><span>    </span><span class="annot"><span class="annottext">Either SomeException a
</span><span class="hs-identifier">_</span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; a
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;empty mfix argument&quot;</span></span></span><span>
</span><span id="line-124"></span><span>
</span><span id="line-125"></span><span id="local-6989586621679055844"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679055527"><span id="local-6989586621679055529"><span id="local-6989586621679055531"><span id="local-6989586621679055533"><span id="local-6989586621679055535"><span id="local-6989586621679055537"><span id="local-6989586621679055539"><span id="local-6989586621679055541"><span id="local-6989586621679055543"><span id="local-6989586621679055545"><span id="local-6989586621679055547"><span id="local-6989586621679055549"><span id="local-6989586621679055551"><span id="local-6989586621679055553"><span id="local-6989586621679055555"><span id="local-6989586621679055558"><span class="annot"><a href="../../base/src/Data.Foldable.html#Foldable"><span class="hs-identifier hs-type">Foldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055844"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Foldable.html#Foldable"><span class="hs-identifier hs-type">Foldable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-type">CatchT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055844"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-126"></span><span>  </span><span id="local-6989586621679055521"><span class="annot"><span class="annottext">foldMap :: forall m a. Monoid m =&gt; (a -&gt; m) -&gt; CatchT m a -&gt; m
</span><a href="../../base/src/Data.Foldable.html#foldMap"><span class="hs-identifier hs-var hs-var hs-var hs-var">foldMap</span></a></span></span><span> </span><span id="local-6989586621679055519"><span class="annot"><span class="annottext">a -&gt; m
</span><a href="#local-6989586621679055519"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-type">CatchT</span></a></span><span> </span><span id="local-6989586621679055518"><span class="annot"><span class="annottext">m (Either SomeException a)
</span><a href="#local-6989586621679055518"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Either SomeException a -&gt; m) -&gt; m (Either SomeException a) -&gt; m
forall (t :: * -&gt; *) m a.
(Foldable t, Monoid m) =&gt;
(a -&gt; m) -&gt; t a -&gt; m
</span><a href="../../base/src/Data.Foldable.html#foldMap"><span class="hs-identifier hs-var">foldMap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; m) -&gt; Either SomeException a -&gt; m
forall {t} {t} {a}. Monoid t =&gt; (t -&gt; t) -&gt; Either a t -&gt; t
</span><a href="#local-6989586621679055517"><span class="hs-identifier hs-var">foldMapEither</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; m
</span><a href="#local-6989586621679055519"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">m (Either SomeException a)
</span><a href="#local-6989586621679055518"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-127"></span><span>    </span><span id="local-6989586621679055517"><span class="annot"><span class="annottext">foldMapEither :: (t -&gt; t) -&gt; Either a t -&gt; t
</span><a href="#local-6989586621679055517"><span class="hs-identifier hs-var hs-var">foldMapEither</span></a></span></span><span> </span><span id="local-6989586621679055514"><span class="annot"><span class="annottext">t -&gt; t
</span><a href="#local-6989586621679055514"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span id="local-6989586621679055513"><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679055513"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">t -&gt; t
</span><a href="#local-6989586621679055514"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679055513"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-128"></span><span>    </span><span class="annot"><a href="#local-6989586621679055517"><span class="hs-identifier hs-var">foldMapEither</span></a></span><span> </span><span class="annot"><span class="annottext">t -&gt; t
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">t
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span></span><span>
</span><span id="line-129"></span><span>
</span><span id="line-130"></span><span id="local-6989586621679055826"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679055502"><span id="local-6989586621679055504"><span id="local-6989586621679055506"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055826"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Traversable.html#Traversable"><span class="hs-identifier hs-type">Traversable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055826"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Traversable.html#Traversable"><span class="hs-identifier hs-type">Traversable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-type">CatchT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055826"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-131"></span><span>  </span><span id="local-6989586621679055493"><span class="annot"><span class="annottext">traverse :: forall (f :: * -&gt; *) a b.
Applicative f =&gt;
(a -&gt; f b) -&gt; CatchT m a -&gt; f (CatchT m b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var hs-var hs-var hs-var">traverse</span></a></span></span><span> </span><span id="local-6989586621679055491"><span class="annot"><span class="annottext">a -&gt; f b
</span><a href="#local-6989586621679055491"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-type">CatchT</span></a></span><span> </span><span id="local-6989586621679055490"><span class="annot"><span class="annottext">m (Either SomeException a)
</span><a href="#local-6989586621679055490"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either SomeException b) -&gt; CatchT m b
forall (m :: * -&gt; *) a. m (Either SomeException a) -&gt; CatchT m a
</span><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-var">CatchT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (Either SomeException b) -&gt; CatchT m b)
-&gt; f (m (Either SomeException b)) -&gt; f (CatchT m b)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">(Either SomeException a -&gt; f (Either SomeException b))
-&gt; m (Either SomeException a) -&gt; f (m (Either SomeException b))
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var">Traversable.traverse</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; f b) -&gt; Either SomeException a -&gt; f (Either SomeException b)
forall {f :: * -&gt; *} {t} {a} {a}.
Applicative f =&gt;
(t -&gt; f a) -&gt; Either a t -&gt; f (Either a a)
</span><a href="#local-6989586621679055488"><span class="hs-identifier hs-var">traverseEither</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; f b
</span><a href="#local-6989586621679055491"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">m (Either SomeException a)
</span><a href="#local-6989586621679055490"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-132"></span><span>    </span><span id="local-6989586621679055488"><span class="annot"><span class="annottext">traverseEither :: (t -&gt; f a) -&gt; Either a t -&gt; f (Either a a)
</span><a href="#local-6989586621679055488"><span class="hs-identifier hs-var hs-var">traverseEither</span></a></span></span><span> </span><span id="local-6989586621679055483"><span class="annot"><span class="annottext">t -&gt; f a
</span><a href="#local-6989586621679055483"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span id="local-6989586621679055482"><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679055482"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Either a a
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; Either a a) -&gt; f a -&gt; f (Either a a)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">t -&gt; f a
</span><a href="#local-6989586621679055483"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679055482"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-133"></span><span>    </span><span class="annot"><a href="#local-6989586621679055488"><span class="hs-identifier hs-var">traverseEither</span></a></span><span> </span><span class="annot"><span class="annottext">t -&gt; f a
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span id="local-6989586621679055481"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055481"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Either a a -&gt; f (Either a a)
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Either a a
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055481"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-134"></span><span>
</span><span id="line-135"></span><span id="local-6989586621679055811"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679055473"><span id="local-6989586621679055475"><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055811"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Alternative"><span class="hs-identifier hs-type">Alternative</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-type">CatchT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055811"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-136"></span><span>  </span><span id="local-6989586621679055469"><span class="annot"><span class="annottext">empty :: forall a. CatchT m a
</span><a href="../../base/src/GHC.Base.html#empty"><span class="hs-identifier hs-var hs-var hs-var hs-var">empty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CatchT m a
forall (m :: * -&gt; *) a. MonadPlus m =&gt; m a
</span><a href="../../base/src/GHC.Base.html#mzero"><span class="hs-identifier hs-var">mzero</span></a></span><span>
</span><span id="line-137"></span><span>  </span><span id="local-6989586621679055465"><span class="annot"><span class="annottext">&lt;|&gt; :: forall a. CatchT m a -&gt; CatchT m a -&gt; CatchT m a
</span><a href="../../base/src/GHC.Base.html#%3C%7C%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">(&lt;|&gt;)</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CatchT m a -&gt; CatchT m a -&gt; CatchT m a
forall (m :: * -&gt; *) a. MonadPlus m =&gt; m a -&gt; m a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#mplus"><span class="hs-identifier hs-var">mplus</span></a></span></span><span>
</span><span id="line-138"></span><span>
</span><span id="line-139"></span><span id="local-6989586621679055809"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055809"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#MonadPlus"><span class="hs-identifier hs-type">MonadPlus</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-type">CatchT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055809"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-140"></span><span>  </span><span id="local-6989586621679055452"><span class="annot"><span class="annottext">mzero :: forall a. CatchT m a
</span><a href="#local-6989586621679055452"><span class="hs-identifier hs-var hs-var hs-var hs-var">mzero</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either SomeException a) -&gt; CatchT m a
forall (m :: * -&gt; *) a. m (Either SomeException a) -&gt; CatchT m a
</span><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-var">CatchT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (Either SomeException a) -&gt; CatchT m a)
-&gt; m (Either SomeException a) -&gt; CatchT m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Either SomeException a -&gt; m (Either SomeException a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Either SomeException a -&gt; m (Either SomeException a))
-&gt; Either SomeException a -&gt; m (Either SomeException a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">SomeException -&gt; Either SomeException a
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="annot"><span class="annottext">(SomeException -&gt; Either SomeException a)
-&gt; SomeException -&gt; Either SomeException a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">IOError -&gt; SomeException
forall e. Exception e =&gt; e -&gt; SomeException
</span><a href="../../base/src/GHC.Exception.Type.html#toException"><span class="hs-identifier hs-var">toException</span></a></span><span> </span><span class="annot"><span class="annottext">(IOError -&gt; SomeException) -&gt; IOError -&gt; SomeException
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; IOError
</span><a href="../../base/src/GHC.IO.Exception.html#userError"><span class="hs-identifier hs-var">userError</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-141"></span><span>  </span><span id="local-6989586621679055449"><span class="annot"><span class="annottext">mplus :: forall a. CatchT m a -&gt; CatchT m a -&gt; CatchT m a
</span><a href="#local-6989586621679055449"><span class="hs-identifier hs-var hs-var hs-var hs-var">mplus</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-type">CatchT</span></a></span><span> </span><span id="local-6989586621679055448"><span class="annot"><span class="annottext">m (Either SomeException a)
</span><a href="#local-6989586621679055448"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-type">CatchT</span></a></span><span> </span><span id="local-6989586621679055447"><span class="annot"><span class="annottext">m (Either SomeException a)
</span><a href="#local-6989586621679055447"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either SomeException a) -&gt; CatchT m a
forall (m :: * -&gt; *) a. m (Either SomeException a) -&gt; CatchT m a
</span><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-var">CatchT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (Either SomeException a) -&gt; CatchT m a)
-&gt; m (Either SomeException a) -&gt; CatchT m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">m (Either SomeException a)
</span><a href="#local-6989586621679055448"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">m (Either SomeException a)
-&gt; (Either SomeException a -&gt; m (Either SomeException a))
-&gt; m (Either SomeException a)
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679055446"><span class="annot"><span class="annottext">Either SomeException a
</span><a href="#local-6989586621679055446"><span class="hs-identifier hs-var">ea</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Either SomeException a
</span><a href="#local-6989586621679055446"><span class="hs-identifier hs-var">ea</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-142"></span><span>    </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span class="annot"><span class="annottext">SomeException
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">m (Either SomeException a)
</span><a href="#local-6989586621679055447"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-143"></span><span>    </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span id="local-6989586621679055445"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055445"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Either SomeException a -&gt; m (Either SomeException a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Either SomeException a
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055445"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-144"></span><span>
</span><span id="line-145"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Class.html#MonadTrans"><span class="hs-identifier hs-type">MonadTrans</span></a></span><span> </span><span class="annot"><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-type">CatchT</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-146"></span><span>  </span><span id="local-6989586621679055438"><span class="annot"><span class="annottext">lift :: forall (m :: * -&gt; *) a. Monad m =&gt; m a -&gt; CatchT m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var hs-var hs-var hs-var">lift</span></a></span></span><span> </span><span id="local-6989586621679055436"><span class="annot"><span class="annottext">m a
</span><a href="#local-6989586621679055436"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either SomeException a) -&gt; CatchT m a
forall (m :: * -&gt; *) a. m (Either SomeException a) -&gt; CatchT m a
</span><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-var">CatchT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (Either SomeException a) -&gt; CatchT m a)
-&gt; m (Either SomeException a) -&gt; CatchT m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-147"></span><span>    </span><span id="local-6989586621679055435"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055435"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">m a
</span><a href="#local-6989586621679055436"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-148"></span><span>    </span><span class="annot"><span class="annottext">Either SomeException a -&gt; m (Either SomeException a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Either SomeException a -&gt; m (Either SomeException a))
-&gt; Either SomeException a -&gt; m (Either SomeException a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Either SomeException a
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055435"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-149"></span><span>
</span><span id="line-150"></span><span id="local-6989586621679055790"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#MonadIO"><span class="hs-identifier hs-type">MonadIO</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055790"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#MonadIO"><span class="hs-identifier hs-type">MonadIO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-type">CatchT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055790"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-151"></span><span>  </span><span id="local-6989586621679055423"><span class="annot"><span class="annottext">liftIO :: forall a. IO a -&gt; CatchT m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var hs-var hs-var hs-var">liftIO</span></a></span></span><span> </span><span id="local-6989586621679055421"><span class="annot"><span class="annottext">IO a
</span><a href="#local-6989586621679055421"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either SomeException a) -&gt; CatchT m a
forall (m :: * -&gt; *) a. m (Either SomeException a) -&gt; CatchT m a
</span><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-var">CatchT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (Either SomeException a) -&gt; CatchT m a)
-&gt; m (Either SomeException a) -&gt; CatchT m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-152"></span><span>    </span><span id="local-6989586621679055420"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055420"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO a -&gt; m a
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span> </span><span class="annot"><span class="annottext">IO a
</span><a href="#local-6989586621679055421"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-153"></span><span>    </span><span class="annot"><span class="annottext">Either SomeException a -&gt; m (Either SomeException a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Either SomeException a -&gt; m (Either SomeException a))
-&gt; Either SomeException a -&gt; m (Either SomeException a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Either SomeException a
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055420"><span class="hs-identifier hs-var">a</span></a></span></span><span>
</span><span id="line-154"></span><span>
</span><span id="line-155"></span><span id="local-6989586621679055783"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055783"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Catch.html#MonadThrow"><span class="hs-identifier hs-type">MonadThrow</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-type">CatchT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055783"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-156"></span><span>  </span><span id="local-6989586621679055410"><span class="annot"><span class="annottext">throwM :: forall e a. Exception e =&gt; e -&gt; CatchT m a
</span><a href="Control.Monad.Catch.html#throwM"><span class="hs-identifier hs-var hs-var hs-var hs-var">throwM</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either SomeException a) -&gt; CatchT m a
forall (m :: * -&gt; *) a. m (Either SomeException a) -&gt; CatchT m a
</span><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-var">CatchT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (Either SomeException a) -&gt; CatchT m a)
-&gt; (e -&gt; m (Either SomeException a)) -&gt; e -&gt; CatchT m a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Either SomeException a -&gt; m (Either SomeException a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Either SomeException a -&gt; m (Either SomeException a))
-&gt; (e -&gt; Either SomeException a) -&gt; e -&gt; m (Either SomeException a)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">SomeException -&gt; Either SomeException a
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="annot"><span class="annottext">(SomeException -&gt; Either SomeException a)
-&gt; (e -&gt; SomeException) -&gt; e -&gt; Either SomeException a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">e -&gt; SomeException
forall e. Exception e =&gt; e -&gt; SomeException
</span><a href="../../base/src/GHC.Exception.Type.html#toException"><span class="hs-identifier hs-var">toException</span></a></span></span><span>
</span><span id="line-157"></span><span id="local-6989586621679055775"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055775"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Catch.html#MonadCatch"><span class="hs-identifier hs-type">MonadCatch</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-type">CatchT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055775"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-158"></span><span>  </span><span id="local-6989586621679055397"><span class="annot"><span class="annottext">catch :: forall e a.
Exception e =&gt;
CatchT m a -&gt; (e -&gt; CatchT m a) -&gt; CatchT m a
</span><a href="Control.Monad.Catch.html#catch"><span class="hs-identifier hs-var hs-var hs-var hs-var">catch</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-type">CatchT</span></a></span><span> </span><span id="local-6989586621679055395"><span class="annot"><span class="annottext">m (Either SomeException a)
</span><a href="#local-6989586621679055395"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679055394"><span class="annot"><span class="annottext">e -&gt; CatchT m a
</span><a href="#local-6989586621679055394"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either SomeException a) -&gt; CatchT m a
forall (m :: * -&gt; *) a. m (Either SomeException a) -&gt; CatchT m a
</span><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-var">CatchT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (Either SomeException a) -&gt; CatchT m a)
-&gt; m (Either SomeException a) -&gt; CatchT m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">m (Either SomeException a)
</span><a href="#local-6989586621679055395"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">m (Either SomeException a)
-&gt; (Either SomeException a -&gt; m (Either SomeException a))
-&gt; m (Either SomeException a)
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679055393"><span class="annot"><span class="annottext">Either SomeException a
</span><a href="#local-6989586621679055393"><span class="hs-identifier hs-var">ea</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Either SomeException a
</span><a href="#local-6989586621679055393"><span class="hs-identifier hs-var">ea</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-159"></span><span>    </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span id="local-6989586621679055392"><span class="annot"><span class="annottext">SomeException
</span><a href="#local-6989586621679055392"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">SomeException -&gt; Maybe e
forall e. Exception e =&gt; SomeException -&gt; Maybe e
</span><a href="../../base/src/GHC.Exception.Type.html#fromException"><span class="hs-identifier hs-var">fromException</span></a></span><span> </span><span class="annot"><span class="annottext">SomeException
</span><a href="#local-6989586621679055392"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-160"></span><span>      </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679055390"><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679055390"><span class="hs-identifier hs-var">e'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CatchT m a -&gt; m (Either SomeException a)
forall (m :: * -&gt; *) a. CatchT m a -&gt; m (Either SomeException a)
</span><a href="Control.Monad.Catch.Pure.html#runCatchT"><span class="hs-identifier hs-var hs-var">runCatchT</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">e -&gt; CatchT m a
</span><a href="#local-6989586621679055394"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679055390"><span class="hs-identifier hs-var">e'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-161"></span><span>      </span><span class="annot"><span class="annottext">Maybe e
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Either SomeException a -&gt; m (Either SomeException a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SomeException -&gt; Either SomeException a
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="annot"><span class="annottext">SomeException
</span><a href="#local-6989586621679055392"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-162"></span><span>    </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span id="local-6989586621679055389"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055389"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Either SomeException a -&gt; m (Either SomeException a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Either SomeException a
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055389"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-163"></span><span class="hs-comment">-- | Note: This instance is only valid if the underlying monad has a single</span><span>
</span><span id="line-164"></span><span class="hs-comment">-- exit point!</span><span>
</span><span id="line-165"></span><span class="hs-comment">--</span><span>
</span><span id="line-166"></span><span class="hs-comment">-- For example, @IO@ or @Either@ would be invalid base monads, but</span><span>
</span><span id="line-167"></span><span class="hs-comment">-- @Reader@ or @State@ would be acceptable.</span><span>
</span><span id="line-168"></span><span id="local-6989586621679055763"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055763"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Catch.html#MonadMask"><span class="hs-identifier hs-type">MonadMask</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-type">CatchT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055763"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-169"></span><span>  </span><span id="local-6989586621679055380"><span class="annot"><span class="annottext">mask :: forall b.
((forall a. CatchT m a -&gt; CatchT m a) -&gt; CatchT m b) -&gt; CatchT m b
</span><a href="Control.Monad.Catch.html#mask"><span class="hs-identifier hs-var hs-var hs-var hs-var">mask</span></a></span></span><span> </span><span id="local-6989586621679055378"><span class="annot"><span class="annottext">(forall a. CatchT m a -&gt; CatchT m a) -&gt; CatchT m b
</span><a href="#local-6989586621679055378"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(forall a. CatchT m a -&gt; CatchT m a) -&gt; CatchT m b
</span><a href="#local-6989586621679055378"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">forall a. a -&gt; a
forall a. CatchT m a -&gt; CatchT m a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-170"></span><span>  </span><span id="local-6989586621679055376"><span class="annot"><span class="annottext">uninterruptibleMask :: forall b.
((forall a. CatchT m a -&gt; CatchT m a) -&gt; CatchT m b) -&gt; CatchT m b
</span><a href="Control.Monad.Catch.html#uninterruptibleMask"><span class="hs-identifier hs-var hs-var hs-var hs-var">uninterruptibleMask</span></a></span></span><span> </span><span id="local-6989586621679055374"><span class="annot"><span class="annottext">(forall a. CatchT m a -&gt; CatchT m a) -&gt; CatchT m b
</span><a href="#local-6989586621679055374"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(forall a. CatchT m a -&gt; CatchT m a) -&gt; CatchT m b
</span><a href="#local-6989586621679055374"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">forall a. a -&gt; a
forall a. CatchT m a -&gt; CatchT m a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-171"></span><span>  </span><span id="local-6989586621679055364"><span class="annot"><span class="annottext">generalBracket :: forall a b c.
CatchT m a
-&gt; (a -&gt; ExitCase b -&gt; CatchT m c)
-&gt; (a -&gt; CatchT m b)
-&gt; CatchT m (b, c)
</span><a href="Control.Monad.Catch.html#generalBracket"><span class="hs-identifier hs-var hs-var hs-var hs-var">generalBracket</span></a></span></span><span> </span><span id="local-6989586621679055362"><span class="annot"><span class="annottext">CatchT m a
</span><a href="#local-6989586621679055362"><span class="hs-identifier hs-var">acquire</span></a></span></span><span> </span><span id="local-6989586621679055361"><span class="annot"><span class="annottext">a -&gt; ExitCase b -&gt; CatchT m c
</span><a href="#local-6989586621679055361"><span class="hs-identifier hs-var">release</span></a></span></span><span> </span><span id="local-6989586621679055360"><span class="annot"><span class="annottext">a -&gt; CatchT m b
</span><a href="#local-6989586621679055360"><span class="hs-identifier hs-var">use</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either SomeException (b, c)) -&gt; CatchT m (b, c)
forall (m :: * -&gt; *) a. m (Either SomeException a) -&gt; CatchT m a
</span><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-var">CatchT</span></a></span><span> </span><span class="annot"><span class="annottext">(m (Either SomeException (b, c)) -&gt; CatchT m (b, c))
-&gt; m (Either SomeException (b, c)) -&gt; CatchT m (b, c)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-172"></span><span>    </span><span id="local-6989586621679055359"><span class="annot"><span class="annottext">Either SomeException a
</span><a href="#local-6989586621679055359"><span class="hs-identifier hs-var">eresource</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CatchT m a -&gt; m (Either SomeException a)
forall (m :: * -&gt; *) a. CatchT m a -&gt; m (Either SomeException a)
</span><a href="Control.Monad.Catch.Pure.html#runCatchT"><span class="hs-identifier hs-var hs-var">runCatchT</span></a></span><span> </span><span class="annot"><span class="annottext">CatchT m a
</span><a href="#local-6989586621679055362"><span class="hs-identifier hs-var">acquire</span></a></span><span>
</span><span id="line-173"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Either SomeException a
</span><a href="#local-6989586621679055359"><span class="hs-identifier hs-var">eresource</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-174"></span><span>      </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span id="local-6989586621679055358"><span class="annot"><span class="annottext">SomeException
</span><a href="#local-6989586621679055358"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Either SomeException (b, c) -&gt; m (Either SomeException (b, c))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Either SomeException (b, c) -&gt; m (Either SomeException (b, c)))
-&gt; Either SomeException (b, c) -&gt; m (Either SomeException (b, c))
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">SomeException -&gt; Either SomeException (b, c)
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="annot"><span class="annottext">SomeException
</span><a href="#local-6989586621679055358"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-175"></span><span>      </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span id="local-6989586621679055357"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055357"><span class="hs-identifier hs-var">resource</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-176"></span><span>        </span><span id="local-6989586621679055356"><span class="annot"><span class="annottext">Either SomeException b
</span><a href="#local-6989586621679055356"><span class="hs-identifier hs-var">eb</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CatchT m b -&gt; m (Either SomeException b)
forall (m :: * -&gt; *) a. CatchT m a -&gt; m (Either SomeException a)
</span><a href="Control.Monad.Catch.Pure.html#runCatchT"><span class="hs-identifier hs-var hs-var">runCatchT</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; CatchT m b
</span><a href="#local-6989586621679055360"><span class="hs-identifier hs-var">use</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055357"><span class="hs-identifier hs-var">resource</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-177"></span><span>        </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Either SomeException b
</span><a href="#local-6989586621679055356"><span class="hs-identifier hs-var">eb</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-178"></span><span>          </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span id="local-6989586621679055355"><span class="annot"><span class="annottext">SomeException
</span><a href="#local-6989586621679055355"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CatchT m (b, c) -&gt; m (Either SomeException (b, c))
forall (m :: * -&gt; *) a. CatchT m a -&gt; m (Either SomeException a)
</span><a href="Control.Monad.Catch.Pure.html#runCatchT"><span class="hs-identifier hs-var hs-var">runCatchT</span></a></span><span> </span><span class="annot"><span class="annottext">(CatchT m (b, c) -&gt; m (Either SomeException (b, c)))
-&gt; CatchT m (b, c) -&gt; m (Either SomeException (b, c))
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-179"></span><span>            </span><span class="annot"><span class="annottext">c
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">a -&gt; ExitCase b -&gt; CatchT m c
</span><a href="#local-6989586621679055361"><span class="hs-identifier hs-var">release</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055357"><span class="hs-identifier hs-var">resource</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SomeException -&gt; ExitCase b
forall a. SomeException -&gt; ExitCase a
</span><a href="Control.Monad.Catch.html#ExitCaseException"><span class="hs-identifier hs-var">ExitCaseException</span></a></span><span> </span><span class="annot"><span class="annottext">SomeException
</span><a href="#local-6989586621679055355"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-180"></span><span>            </span><span class="annot"><span class="annottext">SomeException -&gt; CatchT m (b, c)
forall (m :: * -&gt; *) e a. (MonadThrow m, Exception e) =&gt; e -&gt; m a
</span><a href="Control.Monad.Catch.html#throwM"><span class="hs-identifier hs-var">throwM</span></a></span><span> </span><span class="annot"><span class="annottext">SomeException
</span><a href="#local-6989586621679055355"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-181"></span><span>          </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span id="local-6989586621679055353"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679055353"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CatchT m (b, c) -&gt; m (Either SomeException (b, c))
forall (m :: * -&gt; *) a. CatchT m a -&gt; m (Either SomeException a)
</span><a href="Control.Monad.Catch.Pure.html#runCatchT"><span class="hs-identifier hs-var hs-var">runCatchT</span></a></span><span> </span><span class="annot"><span class="annottext">(CatchT m (b, c) -&gt; m (Either SomeException (b, c)))
-&gt; CatchT m (b, c) -&gt; m (Either SomeException (b, c))
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-182"></span><span>            </span><span id="local-6989586621679055352"><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679055352"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">a -&gt; ExitCase b -&gt; CatchT m c
</span><a href="#local-6989586621679055361"><span class="hs-identifier hs-var">release</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055357"><span class="hs-identifier hs-var">resource</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">b -&gt; ExitCase b
forall a. a -&gt; ExitCase a
</span><a href="Control.Monad.Catch.html#ExitCaseSuccess"><span class="hs-identifier hs-var">ExitCaseSuccess</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679055353"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-183"></span><span>            </span><span class="annot"><span class="annottext">(b, c) -&gt; CatchT m (b, c)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679055353"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">c
</span><a href="#local-6989586621679055352"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-184"></span><span>
</span><span id="line-185"></span><span id="local-6989586621679055748"><span id="local-6989586621679055749"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../mtl/src/Control.Monad.State.Class.html#MonadState"><span class="hs-identifier hs-type">MonadState</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055749"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055748"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../mtl/src/Control.Monad.State.Class.html#MonadState"><span class="hs-identifier hs-type">MonadState</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055749"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-type">CatchT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055748"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-186"></span><span>  </span><span id="local-6989586621679055337"><span class="annot"><span class="annottext">get :: CatchT m s
</span><a href="../../mtl/src/Control.Monad.State.Class.html#get"><span class="hs-identifier hs-var hs-var hs-var hs-var">get</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m s -&gt; CatchT m s
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">m s
forall s (m :: * -&gt; *). MonadState s m =&gt; m s
</span><a href="../../mtl/src/Control.Monad.State.Class.html#get"><span class="hs-identifier hs-var">get</span></a></span><span>
</span><span id="line-187"></span><span>  </span><span id="local-6989586621679055332"><span class="annot"><span class="annottext">put :: s -&gt; CatchT m ()
</span><a href="../../mtl/src/Control.Monad.State.Class.html#put"><span class="hs-identifier hs-var hs-var hs-var hs-var">put</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m () -&gt; CatchT m ()
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(m () -&gt; CatchT m ()) -&gt; (s -&gt; m ()) -&gt; s -&gt; CatchT m ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">s -&gt; m ()
forall s (m :: * -&gt; *). MonadState s m =&gt; s -&gt; m ()
</span><a href="../../mtl/src/Control.Monad.State.Class.html#put"><span class="hs-identifier hs-var">put</span></a></span><span class="hs-cpp">
#if MIN_VERSION_mtl(2,1,0)
</span><span>  </span><span id="local-6989586621679055327"><span class="annot"><span class="annottext">state :: forall a. (s -&gt; (a, s)) -&gt; CatchT m a
</span><a href="../../mtl/src/Control.Monad.State.Class.html#state"><span class="hs-identifier hs-var hs-var hs-var hs-var">state</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m a -&gt; CatchT m a
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(m a -&gt; CatchT m a)
-&gt; ((s -&gt; (a, s)) -&gt; m a) -&gt; (s -&gt; (a, s)) -&gt; CatchT m a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(s -&gt; (a, s)) -&gt; m a
forall s (m :: * -&gt; *) a. MonadState s m =&gt; (s -&gt; (a, s)) -&gt; m a
</span><a href="../../mtl/src/Control.Monad.State.Class.html#state"><span class="hs-identifier hs-var">state</span></a></span></span></span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-192"></span><span id="local-6989586621679055741"><span id="local-6989586621679055742"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679055320"><span class="annot"><a href="../../mtl/src/Control.Monad.Reader.Class.html#MonadReader"><span class="hs-identifier hs-type">MonadReader</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055742"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055741"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../mtl/src/Control.Monad.Reader.Class.html#MonadReader"><span class="hs-identifier hs-type">MonadReader</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055742"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-type">CatchT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055741"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-193"></span><span>  </span><span id="local-6989586621679055315"><span class="annot"><span class="annottext">ask :: CatchT m e
</span><a href="../../mtl/src/Control.Monad.Reader.Class.html#ask"><span class="hs-identifier hs-var hs-var hs-var hs-var">ask</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m e -&gt; CatchT m e
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">m e
forall r (m :: * -&gt; *). MonadReader r m =&gt; m r
</span><a href="../../mtl/src/Control.Monad.Reader.Class.html#ask"><span class="hs-identifier hs-var">ask</span></a></span><span>
</span><span id="line-194"></span><span>  </span><span id="local-6989586621679055312"><span class="annot"><span class="annottext">local :: forall a. (e -&gt; e) -&gt; CatchT m a -&gt; CatchT m a
</span><a href="../../mtl/src/Control.Monad.Reader.Class.html#local"><span class="hs-identifier hs-var hs-var hs-var hs-var">local</span></a></span></span><span> </span><span id="local-6989586621679055310"><span class="annot"><span class="annottext">e -&gt; e
</span><a href="#local-6989586621679055310"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-type">CatchT</span></a></span><span> </span><span id="local-6989586621679055309"><span class="annot"><span class="annottext">m (Either SomeException a)
</span><a href="#local-6989586621679055309"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either SomeException a) -&gt; CatchT m a
forall (m :: * -&gt; *) a. m (Either SomeException a) -&gt; CatchT m a
</span><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-var">CatchT</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(e -&gt; e)
-&gt; m (Either SomeException a) -&gt; m (Either SomeException a)
forall r (m :: * -&gt; *) a. MonadReader r m =&gt; (r -&gt; r) -&gt; m a -&gt; m a
</span><a href="../../mtl/src/Control.Monad.Reader.Class.html#local"><span class="hs-identifier hs-var">local</span></a></span><span> </span><span class="annot"><span class="annottext">e -&gt; e
</span><a href="#local-6989586621679055310"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">m (Either SomeException a)
</span><a href="#local-6989586621679055309"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-195"></span><span>
</span><span id="line-196"></span><span id="local-6989586621679055730"><span id="local-6989586621679055731"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../mtl/src/Control.Monad.Writer.Class.html#MonadWriter"><span class="hs-identifier hs-type">MonadWriter</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055731"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055730"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../mtl/src/Control.Monad.Writer.Class.html#MonadWriter"><span class="hs-identifier hs-type">MonadWriter</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055731"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-type">CatchT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055730"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-197"></span><span>  </span><span id="local-6989586621679055290"><span class="annot"><span class="annottext">tell :: w -&gt; CatchT m ()
</span><a href="../../mtl/src/Control.Monad.Writer.Class.html#tell"><span class="hs-identifier hs-var hs-var hs-var hs-var">tell</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m () -&gt; CatchT m ()
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(m () -&gt; CatchT m ()) -&gt; (w -&gt; m ()) -&gt; w -&gt; CatchT m ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">w -&gt; m ()
forall w (m :: * -&gt; *). MonadWriter w m =&gt; w -&gt; m ()
</span><a href="../../mtl/src/Control.Monad.Writer.Class.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span>
</span><span id="line-198"></span><span>  </span><span id="local-6989586621679055284"><span class="annot"><span class="annottext">listen :: forall a. CatchT m a -&gt; CatchT m (a, w)
</span><a href="../../mtl/src/Control.Monad.Writer.Class.html#listen"><span class="hs-identifier hs-var hs-var hs-var hs-var">listen</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(m (Either SomeException a) -&gt; m (Either SomeException (a, w)))
-&gt; CatchT m a -&gt; CatchT m (a, w)
forall (m :: * -&gt; *) a (n :: * -&gt; *) b.
(m (Either SomeException a) -&gt; n (Either SomeException b))
-&gt; CatchT m a -&gt; CatchT n b
</span><a href="Control.Monad.Catch.Pure.html#mapCatchT"><span class="hs-identifier hs-var">mapCatchT</span></a></span><span> </span><span class="annot"><span class="annottext">((m (Either SomeException a) -&gt; m (Either SomeException (a, w)))
 -&gt; CatchT m a -&gt; CatchT m (a, w))
-&gt; (m (Either SomeException a) -&gt; m (Either SomeException (a, w)))
-&gt; CatchT m a
-&gt; CatchT m (a, w)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621679055282"><span class="annot"><span class="annottext">m (Either SomeException a)
</span><a href="#local-6989586621679055282"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-199"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621679055281"><span class="annot"><span class="annottext">Either SomeException a
</span><a href="#local-6989586621679055281"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679055280"><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679055280"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">m (Either SomeException a) -&gt; m (Either SomeException a, w)
forall w (m :: * -&gt; *) a. MonadWriter w m =&gt; m a -&gt; m (a, w)
</span><a href="../../mtl/src/Control.Monad.Writer.Class.html#listen"><span class="hs-identifier hs-var">listen</span></a></span><span> </span><span class="annot"><span class="annottext">m (Either SomeException a)
</span><a href="#local-6989586621679055282"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-200"></span><span>    </span><span class="annot"><span class="annottext">Either SomeException (a, w) -&gt; m (Either SomeException (a, w))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Either SomeException (a, w) -&gt; m (Either SomeException (a, w)))
-&gt; Either SomeException (a, w) -&gt; m (Either SomeException (a, w))
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24%21"><span class="hs-operator hs-var">$!</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; (a, w))
-&gt; Either SomeException a -&gt; Either SomeException (a, w)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621679055278"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055278"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055278"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">w
</span><a href="#local-6989586621679055280"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Either SomeException a
</span><a href="#local-6989586621679055281"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-201"></span><span>  </span><span id="local-6989586621679055274"><span class="annot"><span class="annottext">pass :: forall a. CatchT m (a, w -&gt; w) -&gt; CatchT m a
</span><a href="../../mtl/src/Control.Monad.Writer.Class.html#pass"><span class="hs-identifier hs-var hs-var hs-var hs-var">pass</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(m (Either SomeException (a, w -&gt; w))
 -&gt; m (Either SomeException a))
-&gt; CatchT m (a, w -&gt; w) -&gt; CatchT m a
forall (m :: * -&gt; *) a (n :: * -&gt; *) b.
(m (Either SomeException a) -&gt; n (Either SomeException b))
-&gt; CatchT m a -&gt; CatchT n b
</span><a href="Control.Monad.Catch.Pure.html#mapCatchT"><span class="hs-identifier hs-var">mapCatchT</span></a></span><span> </span><span class="annot"><span class="annottext">((m (Either SomeException (a, w -&gt; w))
  -&gt; m (Either SomeException a))
 -&gt; CatchT m (a, w -&gt; w) -&gt; CatchT m a)
-&gt; (m (Either SomeException (a, w -&gt; w))
    -&gt; m (Either SomeException a))
-&gt; CatchT m (a, w -&gt; w)
-&gt; CatchT m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621679055272"><span class="annot"><span class="annottext">m (Either SomeException (a, w -&gt; w))
</span><a href="#local-6989586621679055272"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">m (Either SomeException a, w -&gt; w) -&gt; m (Either SomeException a)
forall w (m :: * -&gt; *) a. MonadWriter w m =&gt; m (a, w -&gt; w) -&gt; m a
</span><a href="../../mtl/src/Control.Monad.Writer.Class.html#pass"><span class="hs-identifier hs-var">pass</span></a></span><span> </span><span class="annot"><span class="annottext">(m (Either SomeException a, w -&gt; w) -&gt; m (Either SomeException a))
-&gt; m (Either SomeException a, w -&gt; w) -&gt; m (Either SomeException a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-202"></span><span>    </span><span id="local-6989586621679055271"><span class="annot"><span class="annottext">Either SomeException (a, w -&gt; w)
</span><a href="#local-6989586621679055271"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">m (Either SomeException (a, w -&gt; w))
</span><a href="#local-6989586621679055272"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-203"></span><span>    </span><span class="annot"><span class="annottext">(Either SomeException a, w -&gt; w)
-&gt; m (Either SomeException a, w -&gt; w)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">((Either SomeException a, w -&gt; w)
 -&gt; m (Either SomeException a, w -&gt; w))
-&gt; (Either SomeException a, w -&gt; w)
-&gt; m (Either SomeException a, w -&gt; w)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24%21"><span class="hs-operator hs-var">$!</span></a></span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Either SomeException (a, w -&gt; w)
</span><a href="#local-6989586621679055271"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-204"></span><span>        </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span>  </span><span id="local-6989586621679055270"><span class="annot"><span class="annottext">SomeException
</span><a href="#local-6989586621679055270"><span class="hs-identifier hs-var">l</span></a></span></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SomeException -&gt; Either SomeException a
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span>  </span><span class="annot"><span class="annottext">SomeException
</span><a href="#local-6989586621679055270"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">w -&gt; w
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-205"></span><span>        </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679055269"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055269"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679055268"><span class="annot"><span class="annottext">w -&gt; w
</span><a href="#local-6989586621679055268"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Either SomeException a
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055269"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">w -&gt; w
</span><a href="#local-6989586621679055268"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span class="hs-cpp">
#if MIN_VERSION_mtl(2,1,0)
</span><span>  </span><span id="local-6989586621679055265"><span class="annot"><span class="annottext">writer :: forall a. (a, w) -&gt; CatchT m a
</span><a href="../../mtl/src/Control.Monad.Writer.Class.html#writer"><span class="hs-identifier hs-var hs-var hs-var hs-var">writer</span></a></span></span><span> </span><span id="local-6989586621679055263"><span class="annot"><span class="annottext">(a, w)
</span><a href="#local-6989586621679055263"><span class="hs-identifier hs-var">aw</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Either SomeException a) -&gt; CatchT m a
forall (m :: * -&gt; *) a. m (Either SomeException a) -&gt; CatchT m a
</span><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-var">CatchT</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Either SomeException a
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; Either SomeException a) -&gt; m a -&gt; m (Either SomeException a)
forall (m :: * -&gt; *) a1 r. Monad m =&gt; (a1 -&gt; r) -&gt; m a1 -&gt; m r
</span><a href="../../base/src/GHC.Base.html#liftM"><span class="hs-operator hs-var">`liftM`</span></a></span><span> </span><span class="annot"><span class="annottext">(a, w) -&gt; m a
forall w (m :: * -&gt; *) a. MonadWriter w m =&gt; (a, w) -&gt; m a
</span><a href="../../mtl/src/Control.Monad.Writer.Class.html#writer"><span class="hs-identifier hs-var">writer</span></a></span><span> </span><span class="annot"><span class="annottext">(a, w)
</span><a href="#local-6989586621679055263"><span class="hs-identifier hs-var">aw</span></a></span><span class="hs-special">)</span></span></span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-210"></span><span id="local-6989586621679055710"><span id="local-6989586621679055711"><span id="local-6989586621679055712"><span id="local-6989586621679055713"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../mtl/src/Control.Monad.RWS.Class.html#MonadRWS"><span class="hs-identifier hs-type">MonadRWS</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055713"><span class="hs-identifier hs-type">r</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055712"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055711"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055710"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../mtl/src/Control.Monad.RWS.Class.html#MonadRWS"><span class="hs-identifier hs-type">MonadRWS</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055713"><span class="hs-identifier hs-type">r</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055712"><span class="hs-identifier hs-type">w</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055711"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-type">CatchT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055710"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span></span></span></span><span>
</span><span id="line-211"></span><span>
</span><span id="line-212"></span><span class="hs-comment">-- | Map the unwrapped computation using the given function.</span><span>
</span><span id="line-213"></span><span class="hs-comment">--</span><span>
</span><span id="line-214"></span><span class="hs-comment">-- @'runCatchT' ('mapCatchT' f m) = f ('runCatchT' m)@</span><span>
</span><span id="line-215"></span><span id="local-6989586621679055725"><span id="local-6989586621679055726"><span id="local-6989586621679055727"><span id="local-6989586621679055728"><span class="annot"><a href="Control.Monad.Catch.Pure.html#mapCatchT"><span class="hs-identifier hs-type">mapCatchT</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679055728"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Exception.Type.html#SomeException"><span class="hs-identifier hs-type">SomeException</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055727"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679055726"><span class="hs-identifier hs-type">n</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Exception.Type.html#SomeException"><span class="hs-identifier hs-type">SomeException</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055725"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-216"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-type">CatchT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055728"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055727"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-217"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-type">CatchT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055726"><span class="hs-identifier hs-type">n</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679055725"><span class="hs-identifier hs-type">b</span></a></span></span></span></span></span><span>
</span><span id="line-218"></span><span id="mapCatchT"><span class="annot"><span class="annottext">mapCatchT :: forall (m :: * -&gt; *) a (n :: * -&gt; *) b.
(m (Either SomeException a) -&gt; n (Either SomeException b))
-&gt; CatchT m a -&gt; CatchT n b
</span><a href="Control.Monad.Catch.Pure.html#mapCatchT"><span class="hs-identifier hs-var hs-var">mapCatchT</span></a></span></span><span> </span><span id="local-6989586621679055243"><span class="annot"><span class="annottext">m (Either SomeException a) -&gt; n (Either SomeException b)
</span><a href="#local-6989586621679055243"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679055242"><span class="annot"><span class="annottext">CatchT m a
</span><a href="#local-6989586621679055242"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">n (Either SomeException b) -&gt; CatchT n b
forall (m :: * -&gt; *) a. m (Either SomeException a) -&gt; CatchT m a
</span><a href="Control.Monad.Catch.Pure.html#CatchT"><span class="hs-identifier hs-var">CatchT</span></a></span><span> </span><span class="annot"><span class="annottext">(n (Either SomeException b) -&gt; CatchT n b)
-&gt; n (Either SomeException b) -&gt; CatchT n b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">m (Either SomeException a) -&gt; n (Either SomeException b)
</span><a href="#local-6989586621679055243"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CatchT m a -&gt; m (Either SomeException a)
forall (m :: * -&gt; *) a. CatchT m a -&gt; m (Either SomeException a)
</span><a href="Control.Monad.Catch.Pure.html#runCatchT"><span class="hs-identifier hs-var hs-var">runCatchT</span></a></span><span> </span><span class="annot"><span class="annottext">CatchT m a
</span><a href="#local-6989586621679055242"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-219"></span></pre></body></html>